#include<iostream>
const int N = 1e6 + 10;
int a[N], sum[N];
using namespace std;
int main()
{
	int n, m;cin >> n;
	int l, r;
	int b[] = { 0,1,2,3,4,5,6,7,8,9,10 };
	sum[0] = b[1];
	for (int i = 1; i <= n; i++)
	{
		sum[i] += sum[i - 1] + b[i];
	}
	cin >> l >> r;
	int k = sum[r] - sum[l - 1];
	cout << k;
	return 0;
}